package com.xnyzc.lhy.resource.controller.sms;

import com.xnyzc.lhy.common.component.sms.QCloudSMSUtils;
import com.xnyzc.lhy.common.constant.QCloudSmsConstant;
import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.common.penum.EErrorCode;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import net.sf.json.JSONObject;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(value = "腾讯云短信接口",tags = "腾讯云短信接口")
@RequestMapping("/resource/sms")
public class QCloudSMSController {

//    @ApiOperation(value = "腾讯云短信测试接口", notes = "腾讯云短信测试接口")
//    @PostMapping(value = "/qcloudSmsSend")
//    public Rv qcloudSmsSend() {
//        // 发送验证码
//        JSONObject smsJson = new JSONObject();
//        smsJson.put("code", "123456");
//        try{
//            QCloudSMSUtils.sendMessage("13911441348", QCloudSmsConstant.VERIFICATION_CODE, smsJson);
//            return Rv.error(EErrorCode.success);
//        }catch (Exception e){
//            return Rv.error(EErrorCode.unkown);
//        }
//    }

}
